import base from "./base"; // 导入接口域名列表
import axios from "../http"; // 导入http中创建的axios实例
import qs from "qs"; // 根据需求是否导入qs模块
const getNewsFenlei = {
  getNewsList(params) {
    return axios.post(
      `${base.bd}/admin/news_cate/lists_tree`,
      qs.stringify(params)
    );
  },
  selectNewsFenLei(params) {
    return axios.post(`${base.bd}/admin/news_cate/edit`, qs.stringify(params));
  },
  addNewsFenLei(params) {
    return axios.post(
      `${base.bd}/admin/news_cate/saveadd`,
      qs.stringify(params)
    );
  },
  updateNewsFenLei(params) {
    return axios.post(
      `${base.bd}/admin/news_cate/saveedit`,
      qs.stringify(params)
    );
  },
  delNewsFenLei(params) {
    return axios.post(`${base.bd}/admin/news_cate/del`, qs.stringify(params));
  },
  sortNewsFenLei(params) {
    return axios.post(
      `${base.bd}/admin/news_cate/menu_sort`,
      qs.stringify(params)
    );
  },
  findNewsFenLeiChildRen(params) {
    return axios.post(
      `${base.bd}/admin/news_cate/list_up`,
      qs.stringify(params)
    );
  },
  sortInpitNewsFenLei(params) {
    return axios.post(
      `${base.bd}/admin/news_cate/sort_by_number`,
      qs.stringify(params)
    );
  },
  getNewsCollect(params) {
    return axios.post(
      `${base.bd}/admin/news_cate/option_collection`,
      qs.stringify(params)
    );
  },
};
export default getNewsFenlei;
